<?php
/*
模拟回调接口
form表单POST方式回调，以下为模拟后台接收，仅供参考
 */

require_once "init.php";

$key="86a8eec5ae958e9948b7450439cc57e2";
$method = $_REQUEST["method"];
$version = $_REQUEST["version"];
$format = $_REQUEST["format"];
$merchantNo = $_REQUEST["merchantNo"];
$signType = $_REQUEST["signType"];
$signContent = $_REQUEST["signContent"];
$sign = $_REQUEST["sign"];


$signStr = "method=".$params->_get("method")."&version=".$params->_get("version")."&format=".$params->_get("format")."&merchantNo=".$params->_get("merchantNo")."&signType=".$params->_get("signType")."&signContent=".$params->_get("signContent")."&key=".$key;
echo "固定格式拼接后：".$signStr."\r\n";

$verifyResult = $rsaUtil -> verify($signStr,$sign);
//echo "[响应] RSA验签结果:：".$resMd5Str."\r\n";
if($verifyResult){
echo "验签通过";
}
else {
echo "验签失败";
}


//重要步聚
echo "SUCCESS";//接收到通知并处理本地数据后返回SUCCESS

?>